package com.crm.jdy.common.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**   
 * @Description:(供应商管理实体类)
 * 
 * @version: V1.0
 * @author: kong
 * 
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SupplierInfo extends Model<SupplierInfo> {

	private static final long serialVersionUID = 1616737340900L;

	@TableId(value = "sup_id", type = IdType.ID_WORKER_STR)
	@ApiModelProperty(name = "supId" , value = "供应商主键id")
	private String supId;

	@NotBlank(message = "供应商名字非空")
	@ApiModelProperty(name = "supName" , value = "供应商名字")
	private String supName;
    
	@ApiModelProperty(name = "supLevel" , value = "等级")
	private String supLevel;
    
	@ApiModelProperty(name = "supPhone" , value = "电话")
	private String supPhone;
    
	@ApiModelProperty(name = "supAddr" , value = "地址")
	private String supAddr;
    
	@ApiModelProperty(name = "supChaPerson" , value = "负责人")
	private String supChaPerson;

	@JsonIgnore
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@ApiModelProperty(name = "createTime" , value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;

	@JsonIgnore
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@ApiModelProperty(name = "updateTime" , value = "更新最新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime;

	@JsonIgnore
	@TableLogic
	@ApiModelProperty(name = "isDelete" , value = "0正常  1删除")
	private Integer isDelete;
    
	@ApiModelProperty(name = "supCrePerson" , value = "创建人")
	private String supCrePerson;
    

    

}
